-
Notifications
You must be signed in to change notification settings - Fork 96
Have Uni return types on all Session opening methods #973 #983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@Sanne, you should be able to test Quarkus with this branch without any additional changes but I'm preparing a branch Quarkus that uses the new API |
Tested it, that worked fine.
Nice, let me know when you have something. |
hibernate-reactive-core/src/main/java/org/hibernate/reactive/mutiny/Mutiny.java
Outdated
Show resolved
Hide resolved
hibernate-reactive-core/src/main/java/org/hibernate/reactive/mutiny/Mutiny.java
Outdated
Show resolved
Hide resolved
hibernate-reactive-core/src/main/java/org/hibernate/reactive/mutiny/Mutiny.java
Outdated
Show resolved
Hide resolved
hibernate-reactive-core/src/main/java/org/hibernate/reactive/mutiny/Mutiny.java
Outdated
Show resolved
Hide resolved
Look, I'm not keen on the idea that we're changing the name of a public API because of some transient integration issue. If we really think |
@gavinking we're open to suggestions of course. I did suggest So I think Would you like to suggest some alternatives? |
Well I was very happy with |
|
Or |
while it's not legal in source code we can have both flavours of |
What I'm saying is I don't find your justification for not just removing the previous versions to be very convincing. |
(It puts the cart before the horse.) |
oh yes sure, we initially tried to remove it. On the Quarkus side we're having two Panache tests failing for reasons we couldn't understand yet; we spent some days on this and that's why this is coming a week later than when we last discussed it - I then suggested to Davide that if it was possible to release another CR which had both methods, we could then upgrade Quarkus and migrate one module at a time - and bisect the problem, which is eluding us currently. So another alternative is we try harded to figure it out on the Quarkus side :) if we solve that we could just delete them, but then also deprecating these would feel more like doing the right thing for the few users we already have. |
Why don't you just add some method that Panache needs to the new |
brilliant :) Thanks @DavideD let's do that? It's not as nice to other users but will definitely help us move on. |
I mean, to me it seems much better than releasing 1.0 with some operations on a public API that you're already planning on removing later. |
well to be clear I was going to make this another CR, and then remove it before tagging Final. But sure let's use the |
a76244d
to
c933c2b
Compare
I've updated this PR and moved the mehods required for Quarkus in the interface @Sanne to make this work with Quarkus you need this commit: DavideD/quarkus@3807d77 The rest of the branch contains all the other changes we applied to Quarkus before that make everything work except for Panache |
c933c2b
to
d1d3f88
Compare
Fixes #950
Superseeds #973
Instead of the previous approach of completely remove the existing methods for opening a session lazily, I've deprecated them.
The main reason is that we are having some issues with quarkus and by deprecating the method in the API we can still have a release of Hibernate Reactive and more flexibility about how to fix the integration with Quarkus.
The drawback is that we have to find a new name for the new method (and we cannot use the current name
openSession
).I've opted for
newSession
instead but I'm open to suggestions.As an alternative, I was thinking of
prepareSession
orprepareNewSession
.IT might give a better idea that the returned value won't be an instance ofSession
.@gavinking I think this is something you might want to have a look.